import request from '@/utils/request'

// 查询生产耗材列表
export function listInventory(query) {
  return request({
    url: '/production/inventory/list',
    method: 'get',
    params: query
  })
}

// 查询生产耗材详细
export function getInventory(productionInventoryId) {
  return request({
    url: '/production/inventory/' + productionInventoryId,
    method: 'get'
  })
}

// 新增生产耗材
export function addInventory(data) {
  return request({
    url: '/production/inventory',
    method: 'post',
    data: data
  })
}

// 修改生产耗材
export function updateInventory(data) {
  return request({
    url: '/production/inventory',
    method: 'put',
    data: data
  })
}

// 删除生产耗材
export function delInventory(productionInventoryId) {
  return request({
    url: '/production/inventory/' + productionInventoryId,
    method: 'delete'
  })
}


// 审批生产耗材
export function approverProductionInventory(data) {
  return request({
    url: '/production/inventory/approver',
    method: 'put',
    data: data
  })
}

// 审核生产耗材
export function auditProductionInventory(data) {
  return request({
    url: '/production/inventory/audit',
    method: 'put',
    data: data
  })
}


// 选择成品信息注入
export function chonseProductionInventory(data) {
  return request({
    url: '/production/inventory/chonse',
    method: 'put',
    data: data
  })
}
